import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
Vue.use(VueRouter);

const routes = [{
    path: "/",
    name: "Home",
    component: Home,
    redirect:"/zuixin",
    children: [{
        path: "/zuixin",
        name: "Zuixin",
        component: () => import("../views/Zuixin.vue")
      },
      {
        path: "/ui",
        name: "Ui",
        component: () => import("../views/Ui.vue")
      },
      {
        path: "/piman",
        name: "Piman",
        component: () => import("../views/Piman.vue")
      },
      {
        path: "/chahua",
        name: "Chahua",
        component: () => import("../views/Chahua.vue")
      },
      {
        path: "/sheyin",
        name: "Sheyin",
        component: () => import("../views/Sheyin.vue")
      },
      {
        path: "/youxi",
        name: "Youxi",
        component: () => import("../views/Youxi.vue")
      },
      {
        path: "/doman",
        name: "Doman",
        component: () => import("../views/Doman.vue")
      },
      {
        path: "/goye",
        name: "Goye",
        component: () => import("../views/Goye.vue")
      },
      {
        path: "/janzhu",
        name: "Janzhu",
        component: () => import("../views/Janzhu.vue")
      },
      {
        path: "/rnwen",
        name: "Rnwen",
        component: () => import("../views/Rnwen.vue")
      },
      {
        path: "/jiaju",
        name: "Jiaju",
        component: () => import("../views/Jiaju.vue")
      },
      {
        path: "/nvzhan",
        name: "Nvzhan",
        component: () => import("../views/Nvzhan.vue")
      },
      {
        path: "/nanshi",
        name: "Nanshi",
        component: () => import("../views/Nanshi.vue")
      },
      {
        path: "/zaoxin",
        name: "Zaoxin",
        component: () => import("../views/Zaoxin.vue")
      },
      {
        path: "/shogon",
        name: "Shogin",
        component: () => import("../views/Shogon.vue")
      },
      {
        path: "/meishi",
        name: "Meishi",
        component: () => import("../views/Meishi.vue")
      }
    ]
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import( /* webpackChunkName: "about" */ "../views/About.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;